您可以通过Origin(在线文档'Origin 属性')属性指定坐标轴远点,如下所示:
C# |
拷贝代码
|
---|---|
{ c1Chart1.Reset(true); c1Chart1.Data.Children.Add(new XYDataSeries() { ValuesSource = new double[] { -1, 2, 0, 2, -2 }, XValuesSource = new double[] { -2, -1, 0, 1, 2 } }; c1Chart1.View.AxisX.Origin = 0; c1Chart1.View.AxisY.Origin = 0; c1Chart1.ChartType = ChartType.LineSymbols; })); |